using System.Windows;
using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Composite.UnityExtensions;
using Microsoft.Practices.Unity;
using SouthAfrica.Modules.Case;


namespace SouthAfrica
{
    public partial class SouthAfricaBootstrapper : UnityBootstrapper
    {
        protected override IModuleCatalog GetModuleCatalog()
        {
            var catalog = new ModuleCatalog();
            catalog.AddModule(typeof(CaseModule));
            //    .AddModule(typeof(PositionModule), "MarketModule")
            //    .AddModule(typeof(WatchModule), "MarketModule")
            //    .AddModule(typeof(NewsModule));

            return catalog;
        }

        protected override void ConfigureContainer()
        {
            Container.RegisterType<IShellView, Shell>();
            base.ConfigureContainer();
        }

        protected override DependencyObject CreateShell()
        {
			ShellPresenter presenter = Container.Resolve<ShellPresenter>();
			IShellView view = presenter.View;

			view.ShowView();

			return view as DependencyObject;
        }
    }
}
